home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Forever 2
/
Atari Forever 2.zip
/
Atari Forever 2.iso
/
serie_v
/
v_137
/
arc.doc
< prev
next >
Wrap
Text File
|
1984-05-01
|
18KB
|
389 lines
INTRODUCTION
Purpose and Capabilities
ARC (short for archive) is a file library and compression
utility. It may be thought of as an improved version
of LU and SQUEEZE all rolled into one program.
ARC analyzes each file to see which of a number of
compression techniques will generate the smallest code.
The following estimates give the user a general idea of
how much compression may be gained by using ARC.
ARC Text - 45-55% reduction from original
SQUEEZED Text - 30-40% reduction
ARC Programs - 25-30% reduction
SQUEEZED Programs - 15-20% reduction
ARC Pictures - 45-55% reduction
SQUEEZED Pictures - 40-50% reduction
TINY Pictures - 40-50% reduction
The user should see that compressing files with ARC
will allow easier telecommunications by combining files
and shortening their transfer time.
Usage from TOS
- double-click-left on ARC.TTP icon
- observe OPEN APPLICATION menu for ARC.TTP parameters
- enter switch, archive name and file template
(ex: lh arc.arc *.*)
- hit return or click-left on OK box to begin execution
- "press any key to continue" after completion
ARC was written to be used with a command shell rather
than the desktop. The only difficulty associated with
executing from the desktop is that the desktop reappears
after execution, making it difficult to see what has
been output to the screen.
Usage from Micro C-Shell
- observe the % prompt
- type in command, switch, archive name and file template
(ex: arc l arc.arc *.*)
- hit return to begin execution
- use CNTL-S and CNTL-Q keys as necessary to view text
before it scrolls off the screen
There is one complication to using ARC from the Beckemeyer
C-Shell. When specifying file templates (ex: *.*), the
C-Shell will look at the current directory and expand the
template to the files matched. The problem arises because
this template is intended to match files inside the archive
library (.ARC file). There is a simple solution just
surround the template with double quotes, this tells the
C-Shell not to expand the template.
History
ARC has been in use in the CP/M and MS-DOS world for many
years. Thom Henderson developed the version which I
converted for use on the Atari ST. I am not sure but he
may also be the original author.
It is important to note that no matter who developed this
program, ARC is based on the file compression theories
developed by Huffman, Welch, Knott, Knuth, and many other
scientists.
Bug Reports
Since I developed this version of ARC, I will be responsible
for any erroneous features. Please relay any problems with
a written discription of what happened and the .ARC file
which caused the problem to:
Harvey Johnson
2398 Oaklyn St NE
Palm Bay, FL 32907
- or -
QUILL BBS 305-724-2303
Future Products
It would be nice to have a version of ARC written to utilize
GEM. I would also like to write a picture display feature
that will show compressed pictures directly to the screen.
This will be useful in that ARC squeezes file 5 to 10% smaller
than TINY format. If anyone has the C source to dump NEO,
Degas, or other pictures to the screen please upload a copy
to QUILL BBS.
It would also be nice to allow file redirection from Micro
C-Shell; however, this is not possible because Micro C-Shell
and Megamax C are not compatible at this time.
If you have any ideas for additional capabilities, then send
them to me with a detailed explanation. All thoughts are
welcome.
Donations
It would be nice to be supported if you think that ARC
is any good. Make no mistake, I did NOT write the original
version of ARC, but I have spent all my extra time for
two months making it a reality on the Atari ST.
As I do recieve contributions, I will consider improvements
more seriously. Any donations may be sent to address
specified in Bug Report section.
Thank you one and all in advance for considering this
request, but if you are like me (lazy) then I don't
really expect to ever see a single dime.
ARCHIVE (ARC.TTP)
Usage
arc {amufdxerplvtc}[bswnh][g<password>] <archive> [<filname> ...]
a = add files to archive
m = move files to archive
u = update files in archive
f = freshen files in archive
d = delete files in archive
x,e = extract files from archive
r = run one file with arguments from archive
p = copy files from archive to standard output
l = list files in archive
v = verbose listing of files in archive
t = test archive integrity
c = convert entry to new packing method
b = retain backup copy of archive
s = suppress compression (use Method 2)
w = suppress warning messages
n = suppress notes and comments
h = hold screen before returning to Desktop
g = encrypt/decrypt archive entry
Description
This program is a general archive utility, and is
used to maintain an archive of files. An "archive"
is a single file that combines many files, reducing
storage space and allowing multiple files to be
handled as one.
Switches
a - add files to archive. This switch will force update
or addition the indicated reguardless of creation
time and date.
m - move files to archive. Same as "a" switch except
that the files are deleted from the directory as
they are moved to the archive.
u - update files in archive. This switch will only update
files when the creation date is newer than the
corresponding file in the archive. New files will
be added automatically.
f - freshen files in archive. Same as "u" except that
new files will not be added.
d - delete files in archive. The files are lost forever
and the archive is recompacted to remove the data
for these files.
x,e - extract files from archive. A copy of the files
in the archive are created in the current directory
in an uncompacted state.
r - run one file with arguments from archive. Any
program (.TTP, .TOS, or .PRG) may be executed directly
from the archive. If the program has a resource (.RSC)
it must have the same name as the program
(ex: editor.RSC for editor.PRG). The parameters
after the program name are passed to the program
without modification (doubleqotes may be necessary).
p - copy files from archive to standard output. Useful
for viewing test files in an archive. May also be
handy when used with I/O redirection in C-shells.
l - list files in archive. Limited information listing
of files contained in an archive. Displays only the
filename.
v - verbose listing of files in archive. Complete
information listing of files contained in an archive.
Displays the filename, original length, storage method,
storage factor (% savings), compacted size, date, time,
and CRC.
t - test archive integrity. Check the archive to make sure
it does not have any bad files contained.
c - convert entry to new packing method. Convert files
stored with older methods to newer methods that are
more efficient.
b - retain backup copy of archive. Keep the original
archive file and rename to .BAK. The new version
is named .ARC. This switch may be used with the
following switches: a, m, u, f, d, c.
s - suppress compression. This forces new files to be
saved using Method 2 (no compaction). This switch
may be used with the following switches: a, m, u, f, c.
w - suppress warning messages. This switch will keep
warning message from being displayed which is the default.
Most warnings concern the deletion or existence of
files with the same name.
n - suppress notes and comments. This switch will keep
useful notes from being diaplyed which is the default.
Most notes indicate what stage of compaction is
being run (analyze, compaction, storage).
h - hold screen before returning to Desktop. This switch
should be used whenever ARC is executed from the
Desktop, except in conjunction with file redirection.
g - encrypt/decrypt archive entry. This is used encode
files so that others may not read them. BE CAREFUL!
This must be the last parameter in the switches because
everything following is part of the password.
Examples
Micro C-Shell users should remember to use quotes with
each template in the following examples to prevent
expansion by the shell, see examples.
% arc will show usage instructions
% arc v old.arc will show detailed listing of
files stored in an archive
% arc v old same as previous example
because .ARC is assumed
% arc x old will extract all files
% arc x old *.c will extract all .C files
% arc x old "*.c" same as previous example
% arc p old file.doc will print a file to screen
% arc u old *.c will update or insert the .C
files in current directory
% arc ub old "*.c" same as above except old
archive is renamed OLD.BAK
% arc ugHIDE diary dec86.txt
will update diary.arc with
dec86.txt that is encrypt with
the key "HIDE"
% arc xgHIDE diary dec86.txt
will extract dec86.txt from diary.arc
and decrypt with the key "HIDE"
% arc r util.arc editor text.doc
will run the program editor
(.TTP, .TOS or .PRG) and pass
text.doc as an argument
File redirection is available when executing ARC from
the Desktop (Micro C-Shell apparently has a
hidden defect which prevents this capability). In
order to redirect the output, just add >FILENAME
to the end of any example above where FILENAME is the
name of the file to recieve the output which normally
is displayed on the screen.
ARCHIVE MERGE (ARCM.TTP)
Usage
arcm <tgtarc> <srcarc> [<filename> ...]
<tgtarc> is the archive to add files to
<srcarc> is the archive to get files from
<filename> is the specific files to get
from <srcarc>, *.* is assumed
Description
This program is used to merge archives. That is,
to move files from one archive to another with
no data conversion necessary. Notice you may only
merge two archives at a time.
Examples
Micro C-Shell users should remember to use quotes with
each template in the following examples to prevent
expansion by the shell, see last example.
% arcm will show usage instructions
% arcm put.arc get.arc will add all files from get.arc
to put.arc
% arcm put get same as previous example
because .ARC is assumed
% arcm put get *.c will add only .C files from
get.arc to put.arc
% arcm put get "*.c" same as previous example
ARCHIVE EXTRACT (ARCX.TTP)
Usage
arcx <arcname> [<arcname> ...]
Description
This program is used to extract files from multiple
archives creates using the ARC general maintenance
program. It is similar to ARC X except that it allows
the user to specify many archive libraries or use
an archive filename template. This utility will
extract all files from each archive indicated.
Examples
% arcx will show usage instructions
% arcx arc.arc will extract files from the
archive named "arc.arc"
% arcx arc same as previous example
because .ARC is assumed
% arcx one.arc two will extract files from the
two specified archives only
% arcx *.arc will extract files from all
archives in current directory
TECHNICAL
Library Format
All files are stored in alphabetical order in the
archive library.
The final .ARC library should have a time of modification
which is the same as the most recently modified (youngest)
file in the library. When each file is extracted its
time and date are set to that which is stored in the
header (see next paragraph).
Each entry in the library has a header which contains
the following information:
Filename 13 bytes (char)
Size 4 (long)
Date 2 (int)
Time 2 (int)
CRC 2 (int)
Length 4 (long)
The filename is always followed by a zero (NUL) character.
All of the "int" and "long" feilds are stored in reverse
order, least significant bytes first and most significant
bytes last. The date and time use are specified in standard
format (same as that used on IBM and Atari ST).
Compression Routines
Method 1 - no conversion - files stored using this method
are not translated. This method has been eliminated in
favor of method two which also stores the original file
length. Appears as "--" in verbose listing.
Method 2 - no conversion - files stored using this method
are not translated. Appears as "--" in verbose listing.
Method 3 - repeat character compression - files stored
using this method convert strings of letters to that letter
followed a count. "AAAAA" becomes "A5" in simple terms.
Appears as "Packed" in verbose listing.
Method 4 - Huffman squeezing - files stored using this
method convert characters to smaller bit strings depending
on frequency count of appearance in file. Appears as
"Squeezed" in verbose listing.
Method 5,6,7 - Lempel-Zev compression - files stored in
any of these methods take advantage of repeated strings
of non-identical characters that appear repeatedly
through the file as well as a hashing function.
Various additional improvements distinguish this
methods from each other. Appears as "crunched" in
verbose listing.
Method 8 - Dynamic Lempel-Zev - files stored using
this method takes advantage of repeated strings
of non-identical characters that appear repeatedly
throughout the file. These is by far the most efficient
and commonly employed method of compression. Appears
as "Crunched" in verbose listing.
Other Methods - unknown methods - files stored using more
advanced techniques may appear in the future. The
current version of ARC will not be able to retreive this
files. Appears as "Unknown!" in verbose listing.